package altfee.example;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class IntentExtraActivity extends Activity {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.subview);
		
		Button button = (Button)findViewById(R.id.backToMainBtn);
        button.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
		        Intent intent = new Intent();
		        intent.setClass(IntentExtraActivity.this, MainActivity.class);
		        setResult(AfConstants.INTENT_EXTRA_RESULT, intent);
		        int num = getIntent().getIntExtra("ex", 0);
		        intent.putExtra("ex", num);
		        finish();
			}
		});
	}
}
